package com.slkj.shilixiaoyuanapp.entity;

import com.slkj.shilixiaoyuanapp.R;
import com.slkj.shilixiaoyuanapp.SlxyApplication;

import java.util.List;

/**
 * Created  on 2018-09-17
 *
 * @author 唐开阔
 * @describe
 */
public class StudentAttendanceHisEntity {

    /**
     * date : 2018-09-17
     * stuList : [{"name":"刘钦澜","type":2},{"name":"胡展睿","type":2},{"name":"刘芷言","type":2},{"name":"何欣奇","type":2},{"name":"马梓轩","type":2},{"name":"张家旭","type":1},{"name":"康渊杰","type":1},{"name":"冯灵芸","type":1},{"name":"刘子腾","type":1},{"name":"吴泽宇","type":1},{"name":"丘宛星","type":1},{"name":"吴思恒","type":1},{"name":"何亦杨","type":1},{"name":"黄思诚","type":1},{"name":"郑孟骏","type":1},{"name":"王羿涵","type":1},{"name":"王梓博","type":1},{"name":"黄颖洁","type":1},{"name":"杨梓言","type":1},{"name":"宋雨桐","type":1},{"name":"肖然","type":1},{"name":"陈浩髯","type":1},{"name":"蒋丰与","type":1},{"name":"周俊言","type":1},{"name":"郭艺涵","type":1},{"name":"李雅琪","type":1},{"name":"蒋依芸","type":1},{"name":"叶睿琪","type":1},{"name":"刘悦彤","type":1},{"name":"刘沛凝","type":1},{"name":"何欣怡","type":1},{"name":"蒲艺文","type":1},{"name":"王文馨","type":1},{"name":"孙欣宇","type":1},{"name":"杨宸懿","type":1},{"name":"郭京昆","type":1},{"name":"陈峻浩","type":1},{"name":"陈涵予","type":1},{"name":"陈颜严","type":1},{"name":"郑诗怡","type":1},{"name":"苏畅","type":1},{"name":"陈语涵","type":1},{"name":"叶钰婷","type":1},{"name":"杨梓佚","type":1},{"name":"张帆","type":1},{"name":"赖雨桐","type":1},{"name":"李浩菱","type":1},{"name":"李皓月","type":1},{"name":"胡志豪","type":1},{"name":"刘杰涛","type":1},{"name":"曹婉莹","type":1},{"name":"叶子易","type":1},{"name":"赵源若","type":1},{"name":"谢成宇","type":1},{"name":"雷明明","type":1},{"name":"周小栩","type":1},{"name":"陈辰","type":1}]
     */

    private String date;
    private List<StuListEntity> stuList;

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public List<StuListEntity> getStuList() {
        return stuList;
    }

    public void setStuList(List<StuListEntity> stuList) {
        this.stuList = stuList;
    }

    public static class StuListEntity {
        /**
         * name : 刘钦澜
         * type : 2
         */

        private String name;
        private int type;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }
        public String getTypeStr() {
            switch (type){
                case 0:
                    return "请假";
                case 1:
                    return "正常";

                case 2:
                    return "迟到";

            }
            return "";

        }
        public int getTypeColor() {
            switch (type){
                case 1:
                    return SlxyApplication.getContext().getResources().getColor(R.color.colorAccent) ;
                case 2:
                    return SlxyApplication.getContext().getResources().getColor(R.color.color_red) ;
            }
            return SlxyApplication.getContext().getResources().getColor(R.color.colorAccent) ;

        }
    }
}
